package com.xcity.db.entity;

import java.util.Date;

import com.xcity.game.guild.gmember.GuildMemberData;

import naga.x.common.Initializable;

public class GuildMember implements Initializable{
	private long id;
	private long guildid;
	private int duty;
	private Date createTime;//上一次加入的时间 用于判断是否可加入新公会
	private int lastGetDay;
	private GuildMemberData memData;
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getGuildid() {
		return guildid;
	}
	public void setGuildid(long guildid) {
		this.guildid = guildid;
	}
	public int getDuty() {
		return duty;
	}
	public void setDuty(int duty) {
		this.duty = duty;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public int getLastGetDay() {
		return lastGetDay;
	}
	public void setLastGetDay(int lastGetDay) {
		this.lastGetDay = lastGetDay;
	}
	
	public GuildMember(){};
	public GuildMember(long pid){
		this.id = pid;
		this.createTime = new Date();
		this.memData = new GuildMemberData(null, 0);
	}
	
	public void reset(){
		this.guildid = 0;
		this.duty = 0;
	}
	
	public GuildMemberData getMemData() {
		return memData;
	}
	public void setMemData(GuildMemberData memData) {
		this.memData = memData;
	}
	@Override
	public void init() {
		if(memData == null){
			memData = new GuildMemberData(null, 0);
		}
	}
}
